This is text. I am going to load a data set and clean it. The data set is summarized below:

library(tidyverse)
path <- "../Data/Soil_Predators.csv"
df <- read_csv(path,skip=1,col_names=FALSE)
badcolnames <- readLines(path,n=1)
badcolnames <- badcolnames %>% str_replace_all(",_","_") %>% str_split(",") %>% unlist()

df <- df %>% select(-c(X25,X26))

names(df) <- badcolnames

skimr::skim(df) %>% 
  as.data.frame() %>% 
  kableExtra::kable() %>% 
  kableExtra::kable_classic(lightable_options="hover")
skim_type skim_variable n_missing complete_rate character.min character.max character.empty character.n_unique character.whitespace numeric.mean numeric.sd numeric.p0 numeric.p25 numeric.p50 numeric.p75 numeric.p100 numeric.hist
character Predator_order 0 1.0000000 14 14 0 2 0 NA NA NA NA NA NA NA NA
character Predator_family 0 1.0000000 11 13 0 4 0 NA NA NA NA NA NA NA NA
character Predator_species 0 1.0000000 12 20 0 13 0 NA NA NA NA NA NA NA NA
character Predator_development_stage 65 0.8911223 5 8 0 2 0 NA NA NA NA NA NA NA NA
character Predator_sex 319 0.4656616 4 6 0 2 0 NA NA NA NA NA NA NA NA
character Study_site 0 1.0000000 5 5 0 4 0 NA NA NA NA NA NA NA NA
character Collection_date 0 1.0000000 8 10 0 8 0 NA NA NA NA NA NA NA NA
numeric Predator_individual_number 0 1.0000000 NA NA NA NA NA 3155.5946399 690.5657635 1895.0000000 2613.000000 3167.000000 3819.00000 4246.00000 ▅▇▆▅▇
numeric Predator_body_length_[mm_measured] 1 0.9983250 NA NA NA NA NA 9.2290268 5.0715863 2.0000000 6.000000 8.000000 11.00000 47.00000 ▇▂▁▁▁
numeric Predator_body_mass_[mg_calculated]_ 1 0.9983250 NA NA NA NA NA 8.7169073 6.7999583 0.2888016 3.726161 7.279457 12.23742 48.07547 ▇▃▁▁▁
numeric Consumption_prey_Araneae 0 1.0000000 NA NA NA NA NA 0.0201005 0.1404618 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Diptera 0 1.0000000 NA NA NA NA NA 0.1155779 0.3199862 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Gamasidae 0 1.0000000 NA NA NA NA NA 0.0418760 0.2004738 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Isopoda 0 1.0000000 NA NA NA NA NA 0.0452261 0.2079740 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Lumbricidae 0 1.0000000 NA NA NA NA NA 0.0938023 0.2917980 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Oribatida 0 1.0000000 NA NA NA NA NA 0.0134003 0.1150780 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Staphylinidae 0 1.0000000 NA NA NA NA NA 0.0301508 0.1711454 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Collembola 0 1.0000000 NA NA NA NA NA 0.2847571 0.4516771 0.0000000 0.000000 0.000000 1.00000 1.00000 ▇▁▁▁▃
numeric Consumption_prey_Ceratophysella_denticulata 312 0.4773869 NA NA NA NA NA 0.0070175 0.0836232 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Folsomia_quadrioculata 312 0.4773869 NA NA NA NA NA 0.0912281 0.2884396 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Lepidocyrtus_lanuginosus 312 0.4773869 NA NA NA NA NA 0.0280702 0.1654639 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Protaphorura_armata 312 0.4773869 NA NA NA NA NA 0.0315789 0.1751839 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Pogonognathellus_longicornis 312 0.4773869 NA NA NA NA NA 0.0070175 0.0836232 0.0000000 0.000000 0.000000 0.00000 1.00000 ▇▁▁▁▁
numeric Consumption_prey_Lithobiidae 532 0.1088777 NA NA NA NA NA 0.0000000 0.0000000 0.0000000 0.000000 0.000000 0.00000 0.00000 ▁▁▇▁▁

NOW I’M GONNA ANALYZE

First, an image

#knitr::include_graphics(path to graphics)

List of Predator Species

df$Predator_species %>% unique
##  [1] "Lithobius_mutabilis"  "Lithobius_aulacopus"  "Lithobius_sp"        
##  [4] "Lithobius_crassipes"  "Lithobius_nodulipes"  "Lithobius_dentatus"  
##  [7] "Lithobius_melanops"   "Lithobius_muticus"    "Lithobius_curtipes"  
## [10] "Lithobius_piceus"     "Geophilus_sp"         "Schendyla_nemorensis"
## [13] "Strigamia_acuminata"
df$prey_richness <- 
df %>% select(starts_with("Consumption")) %>% rowSums(na.rm=TRUE)

p <- df %>% 
  ggplot(aes(x=Predator_development_stage,y=prey_richness,color=Predator_sex))+
  geom_boxplot() + 
  theme_bw()
plotly::ggplotly(p)